Machines that can "understand" the speech acts of humans and then perform speech acts of their own "volition" is a hard problem. It is an ongoing are of research, so we not claim to help you solve it here. However we will show you how to program a machine to simulate something approaching the speech act fluency of humans, albeit not very wise, sensitive, or knowledgeable humans. Nonetheless these machine utterances will be sufficient to

Seem more human than mechanical
Have a personality
Have knowledge sufficient to answer questions in some domain
Be able to learn from experience
Be able to recognize and imitate the style of famous (prolific) human writers
Perhaps even provoke some unexpected good humor or creative thinking in its listener

In short, the chat bot we help you build will be a useful companion and assistant in areas of knowledge where you can find freely available data to train her with.

Why her? That wasn't merely an intentional counterweight to the bias inherent in most textbooks. Nor an attempt to balance the bias in language itself ("hu-man", "man-kind", "wo-man") (ref study on insect flower word bias). But rather an intent to shape the personality in a particular way that is distinct from the average maleness of most chat dialogs on line. 
